package soucesystemtest;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by pc-gong on 2017/2/22.
 */
@Configuration
//@ComponentScan
@EnableAspectJAutoProxy
public class CDPlayerConfig {

    @Bean
    public CompactDisc sgtpeppers() {
        BlankDisc cd = new BlankDisc();
        List<String> tracks = new ArrayList<String>();
        tracks.add("paly a");
        tracks.add("play b");
        tracks.add("play c");
        cd.setTracks(tracks);

        return  cd;
    }

    @Bean
    public CDPlayer cdPlayer() {
        return new CDPlayer(sgtpeppers());
    }

    @Bean
    public TrackCounter trackCounter() {
        return new TrackCounter();
    }
}
